package com.htzz.collection.config;

public enum SystemConfig {

    //    200	success	成功
    //    500	unexpected_error	未知错误
    //    101	abnormal occurrence	预期之外的异常
    //    301	device not exist	设备不存在
    //    302	deviceType not exist	设备类型不存在
    //    303	deviceGroup not exist	设备组不存在
    //    304	gateway not exist	网关不存在
    //    305	identity not exist	身份不存在
    //    306	org not exist	企业不存在
    //    307	collpoint not exist	采集点不存在
    //    308	name repeat	名称重复
    //    309	keyname repeat	keyname 重复
    //    310	this agreement identity not exist	此协议标识不存在
    //    311	enum not exist	枚举不存在
    //    312	devnum repeat	设备编号重复
    //    313	gateway_has_devices	网关有设备
    //    401	parameter is incorrect	参数不正确
    //    402	parameter too many	参数太多
    //    403	parameter valid faliure	校验参数失败
    //    404	no traders	没有使用商
    //    405	no this cache in memcache	在memcache中没有这个缓存
    //    406	this interface is not allowed to use. please contact the administrator.	不允许使用此接口。请与管理员联系
    //    407	no this cache in redis	在Redis中没有这个缓存
    //    408	no corresponding device dealer	没有相应的设备经销商
    //    409	No corresponding equipment dealer	没有相应的设备经销商
    //    410	no flie or suffix name is not qualified	没有不合格的flie或后缀名

    SUCCESS(200,"success"),
    EXCEPTION(500,"unexpected_error"),
    ABNORMAL_OCCURRENCE(101,"abnormal occurrence"),
    DEVICE_NOT_EXIST(301,"device not exist"),
    DEVICE_TYPE_NOT_EXIST(302,"deviceType not exist"),
    DEVICE_GROUP_NOT_EXIST(303,"deviceGroup not exist"),
    GATEWAY_NOT_EXIST(304,"gateway not exist"),
    IDENTITY_NOT_EXIST(305,"identity not exist"),
    ORG_NOT_EXIST(306,"org not exist"),
    COLLPOINT_NOT_EXIST(307,"collpoint not exist"),
    NAME_REPEAT(308,"name repeat"),
    KEYNAME_REPEAT(309,"keyname repeat"),
    AGREEMENT_NOT_EXIST(310,"this agreement identity not exist"),
    ENUM_NOT_EXIST(311,"enum not exist"),
    DEVNUM_REPEAT(312,"devnum repeat"),
    GATEWAY_NO_DEVICES(313,"gateway has no devices"),
    PARAMETER_IS_INCORRECT(401,"parameter is incorrect"),
    PARAMETER_TOO_MANY(402,"parameter too many"),
    PARAMETER_VALID_FALIURE(403,"parameter valid faliure"),
    NO_TRADERS(404,"no traders"),
    NO_MEMACHE_CACHE(405,"no this cache in memcache"),
    NOT_ALLOWED(406,"this interface is not allowed to use. please contact the administrator"),
    NO_REDIS_CACHE(407,"no this cache in redis"),
    NO_DEALER(408,"no corresponding device dealer"),
    ERR_FILE(410,"no flie or suffix name is not qualified");




    int code;
    String msg;

    SystemConfig(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
